// src/types/index.ts
export interface BodyItem {
  id: number
  type: string
  isPlaceholder?: boolean // 占位节点标记
  title?: string
  content?: string
  height?: number
  margin?: string
  backgroundColor?: string
  _index?: number // 用于在designer中标识组件的原始索引
  [key: string]: unknown // 允许后续扩展
}

export interface Header {
  type: string
  title: string
  backgroundColor: string
  leftIcon: string
  rightIcon: string
}

export interface TabBarItem {
  icon: string
  text: string
  path: string
  badge?: number
}

export interface TabBar {
  backgroundColor: string
  activeColor: string
  inactiveColor: string
  list: TabBarItem[]
}

export interface DesignerData {
  pageId: string
  title: string
  backgroundColor: string
  header: Header
  body: BodyItem[]
  tabBar: TabBar
}